package com.xy.biz.ts.domain.enums;

import com.xy.lang.domain.KeyValue;
import com.xy.lang.enums.StringCodeEnum;

/**
 * @author Greekn Zhang
 * @date 2022/1/4 10:45
 * @description
 */
public enum TrainCodeEnum implements StringCodeEnum {
    TRAIN("train", "培训字典分组"),
    YEAR("year", "年度培训"),
    COMMON("common", "普通培训"),
    SELF_STUDY("self_study", "自学"),
    PRACTICAL("practical", "实操"),
    THEORY("theory", "理论讲解"),
    ASSESS_EXAMINATION("assess_examination", "试题考核"),
    ASSESS_PRACTICAL("assess_practical", "实操考核"),
    TECH("tech", "技能培训"),
    QUALITY("quality", "素质培训"),
    INSIDE("inside", "内部培训"),
    OUTSIDE("outside", "外部培训"),
    EXTERNAL("external", "外聘培训"),
    SELF("self", "自费"),
    PUBLIC("public", "公费"),
    FREE("free", "免费");

    private String code;
    private String name;

    TrainCodeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public KeyValue<String, String> toKeyValue() {
        return new KeyValue<>(this.code, this.name);
    }
}
